import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import agconnect from "@hw-agconnect/api";
import { createPinia } from "pinia";


const agConnectConfig = 
{
	"agcgw":{
		"backurl":"connect-drcn.hispace.hicloud.com",
		"url":"connect-drcn.dbankcloud.cn",
		"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
		"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
	},
	"agcgw_all":{
		"CN":"connect-drcn.dbankcloud.cn",
		"CN_back":"connect-drcn.hispace.hicloud.com",
		"DE":"connect-dre.dbankcloud.cn",
		"DE_back":"connect-dre.hispace.hicloud.com",
		"RU":"connect-drru.hispace.dbankcloud.ru",
		"RU_back":"connect-drru.hispace.dbankcloud.cn",
		"SG":"connect-dra.dbankcloud.cn",
		"SG_back":"connect-dra.hispace.hicloud.com"
	},
	"websocketgw_all":{
		"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
		"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
		"DE":"connect-ws-dre.hispace.dbankcloud.cn",
		"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
		"RU":"connect-ws-drru.hispace.dbankcloud.ru",
		"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
		"SG":"connect-ws-dra.hispace.dbankcloud.cn",
		"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
	},
	"client":{
		"cp_id":"2850086000459400714",
		"product_id":"388421841222102984",
		"client_id":"1402747262399980928",
		"client_secret":"A68AFC391D52F571322D6176C6F3F8D97B6C24C09E096F84C5A2DBA2B69D9954",
		"project_id":"388421841222102984",
		"app_id":"172249065903128537",
		"api_key":"DQEDAF2syr0qd0rxJ7NyxIhxetU5ieIKVVPgSbduvd17MQGWWij1c3jwEB69aJNqera1jX8TrR1KYAIINH0Nec0GxakhI4Quk+W9+g=="
	},
	"oauth_client":{
		"client_id":"110815881",
		"client_type":7
	},
	"app_info":{
		"app_id":"172249065903128537"
	},
	"service":{
		"analytics":{
			"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
			"collector_url_ru":"datacollector-drru.dt.dbankcloud.ru,datacollector-drru.dt.hicloud.com",
			"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
			"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
			"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
			"resource_id":"p1",
			"channel_id":""
		},
		"edukit":{
			"edu_url":"edukit.cloud.huawei.com.cn",
			"dh_url":"edukit.cloud.huawei.com.cn"
		},
		"search":{
			"url":"https://search-drcn.cloud.huawei.com"
		},
		"cloudstorage":{
			"storage_url_sg_back":"https://agc-storage-dra.cloud.huawei.asia",
			"storage_url_ru_back":"https://agc-storage-drru.cloud.huawei.ru",
			"storage_url_ru":"https://agc-storage-drru.cloud.huawei.ru",
			"storage_url_de_back":"https://agc-storage-dre.cloud.huawei.eu",
			"storage_url_de":"https://ops-dre.agcstorage.link",
			"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn",
			"storage_url_sg":"https://ops-dra.agcstorage.link",
			"storage_url_cn_back":"https://agc-storage-drcn.cloud.huawei.com.cn",
			"storage_url_cn":"https://agc-storage-drcn.platform.dbankcloud.cn",
			"default_storage":"market-cvyw2"
		},
		"ml":{
			"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
		}
	},
	"region":"CN",
	"configuration_version":"3.0"
};

agconnect.instance().configInstance(agConnectConfig);

import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// 2 pinia使用数据持久化插件


const pinia = createPinia()
pinia.use(piniaPluginPersistedstate);
createApp(App).use(ElementPlus).use(router).use(pinia).mount('#app');

export default pinia;
